package org.andromda.android.net;

public final class NetworkException extends Exception {
	/**
	 * 
	 */
	private static final long serialVersionUID = 7056517233475982917L;
	public final NetworkStatus status;
	public final int httpCode;

	public NetworkException(final NetworkStatus status) {
		this.status = status;
		this.httpCode = -1;
	}

	public NetworkException(final NetworkStatus status, final int httpCode,
			final String detailMessage) {
		super(detailMessage);
		this.status = status;
		this.httpCode = httpCode;
	}

	public NetworkException(final NetworkStatus status, final int httpCode,
			final String detailMessage, final Throwable th) {
		super(detailMessage, th);
		this.status = status;
		this.httpCode = httpCode;
	}

	public NetworkException(final NetworkStatus status,
			final String detailMessage, final Throwable th) {
		super(detailMessage, th);
		this.status = status;
		this.httpCode = -1;
	}

}
